<?php
set_include_path("../include");
require_once 'util/helperFunctions.php';
require_once 'model/Registration.php';
require_once 'model/Event.php';

function betaald($code) {
	$reg = Registration::loadRegistrationByCode($code);
	$reg->setPayed(true);
	$reg->saveIsPayed();
}

$text = $_POST["inputtxt"];
$eventid = $_POST["eventid"];
$text = 
$token = strtok($text, " \n\r");

while ($token!==false) {
	betaald($token);
	// next token
	$token = strtok(" \n\r");
}

header("Location: ../admin.php?evt=".$eventid."&p=muli");
?>